import Vue from 'vue'
import App from './App.vue'
import store from './vuex/store'
import ElementUI from 'element-ui'
import 'element-ui/lib/theme-default/index.css'
import VueRouter from "vue-router"
//开启debug模式
Vue.config.debug = true;
Vue.use(ElementUI)
Vue.use(VueRouter);

import index from './components/index.vue'
import login_teacher from './components/index/login_teacher.vue'
import login_student from './components/index/login_student.vue'
import student from'./components/student.vue'
import teacher from'./components/teacher.vue'
import Admin_login from'./components/Admin_login.vue'
import home from'./components/home.vue'
import user from'./components/user.vue'
import addClass from'./components/addClass.vue'
import upload from'./components/upload.vue'
import upload_1 from'./components/upload_1.vue'
// 创建一个路由器实例并且配置路由规则
const router = new VueRouter({
  mode: 'history',
  base: __dirname,
  routes: [
    {
      path:'/',
      component:index,
      children:[
        {path:'/',component:login_teacher},
        {path:'/login_student',component:login_student}
      ]  
    },
    {
      path:'/addClass',
      component:addClass
    },
    {
      path:'/student',
      component:student
    },
    {
      path:'/teacher',
      component:teacher
    },
     {
      path:'/Admin_login',
      component:Admin_login
    },
    {
      path:'/home',
      component:home,
      children:[
          {path: 'user' ,component:user}
      ]
    },
    {
      path:'/upload',
      component:upload
    },
     {
      path:'/upload_1',
      component:upload_1
    },
  ]
})

// 路由器会创建一个 App 实例，并且挂载到选择符 #app 匹配的元素上。
const app = new Vue({
  router: router,
  store,
  render: h => h(App)
}).$mount('#app')

